<template>
  <n-space>
    <n-button type="info" @click="handleEdit">编辑</n-button>

    <n-popconfirm
        negative-text="取消"
        positive-text="确认"
        @positive-click="handleDelete"
    >
      <template #trigger>
        <n-button type="error">删除</n-button>
      </template>
      是否删除当前用户
    </n-popconfirm>
  </n-space>
</template>

<script lang="ts">
export default {
  name: "UserListOperate"
}
</script>

<script setup lang="ts">
import {onMounted} from "vue"

const emit = defineEmits<{
  (e: "edit"): void
  (e: "delete"): void
}>()

const handleEdit = () => {
  emit('edit')
}

const handleDelete = () => {
  emit('delete')
}

onMounted( () => {
} )
</script>

<style scoped lang="scss">

</style>
